Test Series - java script

Test Number 44/92

Q: 
A. 
B. 
C. 
D. 
Solution: 
Q: Which of the following is not the feature of jQuery?
A. Efficient query method for finding the set of document elements
B. Expressive syntax for referring to elements in the document
C. Useful set of methods for manipulating selected elements
D. Powerful functional programming techniques is not used for operating on sets of elements as a group
Solution: These features are at the heart of jQuery’s power and utility:
An expressive syntax (CSS selectors) for referring to elements in the document
An efficient query method for finding the set of document elements that match a CSS selector
A useful set of methods for manipulating selected elements
Powerful functional programming techniques for operating on sets of elements as a group, rather than one at a time
A succinct idiom (method chaining) for expressing sequences of operations.
Q: Which of the following is a single global function defined in the jQuery library?
A. jQuery()
B. $()
C. Queryanalysis()
D. global()
Solution: The jQuery library defines a single global function named jQuery(). This function is so frequently used that the library also defines the global symbol $ as a shortcut for it. The $ sign it’s just an alias to jQuery(), then an alias to a function which is used as a selector element.
Q: Which of the following is a factory function?
A. $()
B. jQuery()
C. Queryanalysis()
D. onclick()
Solution: jQuery() is a factory function rather than a constructor: it returns a newly created object but is not used with the new keyword. jQuery objects define many methods for operating on the sets of elements they represent.
Q: Which is the JavaScript code that asks for the set of all div elements in a document?
A.  var divs = $(div);
B.  var divs = jQuery("div");
C.  var divs = $("div");
D. var divs = #("div");
Solution: $ sign is used as an selector element and the argument passed to $ function is selected. The code to ask for the set of all div elements in a document is
var divs = $("div");
Q: Which is the method that operates on the return value of $()?
A. show()
B. css()
C. click()
D. done()
Solution: The css() method sets or returns one or more style properties for the selected elements. The css() method operates on the jQuery object returned by $(), and returns that same object, so that the show() method can be invoked next in a compact “method chain.”
Q: What does the min mean in the following JavaScript code?

A. Minimised version
B. Miniature
C. Minimised parameters
D. Minimum value
Solution: The min means the minimised version of the library, with unnecessary comments and whitespace removed, and internal identifiers replaced with shorter ones. The file size of minfile is smaller than the original file hence it makes it easier to load.
Q: Which of the following is a heavily overloaded function?
A. jQuery()
B. $()
C. script()
D. Both jQuery() and $()
Solution: $() is just an alias function of jquery(). The jQuery() function (a.k.a) $()) is the most important one in the jQuery library. It is heavily overloaded, however, and there are four different ways you can invoke it.
Q: Which of the following is an equivalent replacement of $(document).ready(f)?
A. jQuery(f)
B. $(f)
C. #(f)
D. read(f)
Solution: The equivalent replacement of $(document).ready(f) is $(f). Writing $(document) performs the function of selecting the whole document which is the same as writing $() only.
Q: Which of the following is a utility function in jQuery?
A. jQuery.each()
B. jQuery.parseJSON()
C. jQuery.noConflict()
D. jQuery.conflict()
Solution: jQuery.noConflict() is the utility function in jQuery. The noConflict() method releases the hold on the $ shortcut identifier, so that other scripts can use it.
Q: Which of the following is used for parsing JSON text?
A. jQuery.each()
B. jQuery.parseJSON()
C. jQuery.noConflict()
D. jQuery.conflict()
Solution: jQuery.parseJSON() is used for parsing JSON text. The function converts json to javascript object.

You Have Score    /11